<!DOCTYPE html>
<html 
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
	lang="en">
<head>
	<th:block th:include="layout/header :: header-meta('Admin detail')"></th:block>
</head>
<body>

<th:block th:include="layout/header :: navbar"></th:block>

<div class="container">

<div th:if="${param.success ne null and param.success[0] eq 'true'}" class="alert alert-success">Saved!</div>

<form action="" method="post" th:object="${user}" class="form-horizontal" autocomplete="off">

<!-- fix for chrome, because autocomplete="off" isn't working -->
<!-- http://stackoverflow.com/questions/12374442/chrome-browser-ignoring-autocomplete-off -->
<input style="display:none"/>
<input type="password" style="display:none"/>

		<div class="form-group">
			<label for="password" class="col-sm-2 control-label">Username:</label>
			<div class="col-sm-10">
				<input type="text" th:field="*{name}" class="form-control" />
				<span th:if="${#fields.hasErrors('name')}" th:errors="*{name}">error</span>
			</div>
		</div>

		<div class="form-group">
			<label for="password" class="col-sm-2 control-label">Password:</label>
			<div class="col-sm-10">
				<input type="password" th:field="*{password}" class="form-control" />
				<span th:if="${#fields.hasErrors('password')}" th:errors="*{password}">error</span>
			</div>
		</div>

        <input type="submit" class="btn btn-primary" value="Save" />

</form>

<th:block th:include="layout/footer :: footer"></th:block>

</div>
</body>
</html>